/**
 * Copyright ® 2016 华夏快线 版权所有
 *
 * @Title: CertificateTypeServiceImpl.java
 * @Package com.hxexp.weixin.mvc.common.service.impl
 * @author li.jiang
 * @date 2016年9月22日 下午4:08:26
 * @version 1.0
 */
package com.hxexp.weixin.mvc.common.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.hxexp.weixin.mvc.common.service.CertificateTypeService;

/**
 * 证件类型服务实现类
 *
 * @author li.jiang
 *
 */
@Service
public final class CertificateTypeServiceImpl implements CertificateTypeService {
    @Value("${certificate_type_passport}")
    private String passportStartStationIds; // 支持护照证件类型的车站编码
    @Value("${certificate_type_officers}")
    private String officersStartStationIds; // 支持军官证件类型的车站编码

    /* (non-Javadoc)
     * @see com.hxexp.weixin.mvc.common.service.CertificateTypeService#isPassport(java.lang.String)
     */
    @Override
    public boolean isSupportPassport(String startStationId) {
        List<String> passportStartStationIdList = Arrays.asList(passportStartStationIds.split(","));
        return passportStartStationIdList.contains(startStationId);
    }

    /* (non-Javadoc)
     * @see com.hxexp.weixin.mvc.common.service.CertificateTypeService#isOfficers(java.lang.String)
     */
    @Override
    public boolean isSupportOfficers(String startStationId) {
        List<String> officersStartStationIdList = Arrays.asList(officersStartStationIds.split(","));
        return officersStartStationIdList.contains(startStationId);
    }

}
